const express = require("express");
const router = require("./router");
const app = express();
const bodyParser = require('body-parser');

// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }));

// parse application/json
app.use(bodyParser.json());

app.use("/node_modules/", express.static("./node_modules/"));
app.use("/public/", express.static("./public/"));

app.engine('html', require('express-art-template'));

// router(app);
app.use(router);

app.listen(2500, () => {
    console.log("this server is running at http://127.0.0.1:2500")
});

